package projectwork.shchuangge.cn.com.newproject.ui.fragment;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import projectwork.shchuangge.cn.com.newproject.R;
import projectwork.shchuangge.cn.com.newproject.adapter.BagBusListAdapter;
import projectwork.shchuangge.cn.com.newproject.uitls.Utils;

/**
 * Created by 赵航 on 2017/6/17.
 */

public class BagFragment extends BeasicFragment {

    private RecyclerView mRecyclerVie;
    private BagBusListAdapter mAdapter;

    @Override
    protected Object requestNetData() {
       Utils.runOnUIThread(new Runnable() {
           @Override
           public void run() {
               mAdapter = new BagBusListAdapter();
               mRecyclerVie.setAdapter(mAdapter);
           }
       });
        return null;
    }

    @Override
    public View creatSuccessView() {
        View view = View.inflate(getContext(), R.layout.bagfragment_layout, null);
        mRecyclerVie = (RecyclerView) view.findViewById(R.id.bag_shown_list);
        LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
        mRecyclerVie.setLayoutManager(layoutManager);
        mAdapter = new BagBusListAdapter();
        mRecyclerVie.setAdapter(mAdapter);
        return view;
    }
}
